﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ZFCNew_Vectors="clr-namespace:ZFCNew.Vectors" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ei="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" xmlns:models="clr-namespace:ZFCNew.ViewModels" xmlns:local="clr-namespace:ZFCNew.Controls" mc:Ignorable="d"
	x:Class="ZFCNew.Controls.NewsControlAlternate" Width="705" Height="127"
	>
    
        <Grid x:Name="grid" Width="700" Margin="0" RenderTransformOrigin="0.914,0.5">
        <Grid.RenderTransform>
        	<CompositeTransform ScaleX="-1" TranslateX="-582"/>
        </Grid.RenderTransform>
        <VisualStateManager.CustomVisualStateManager>
            <ei:ExtendedVisualStateManager/>
        </VisualStateManager.CustomVisualStateManager>
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="MouseHover">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0" To="MouseHoverState"/>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="MouseHoverState">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="grid">
                            <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="3"/>
                            <EasingDoubleKeyFrame KeyTime="0:0:0.4" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="normal"/>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <i:Interaction.Triggers>
            <i:EventTrigger EventName="MouseEnter">
                <ei:GoToStateAction StateName="MouseHoverState"/>
            </i:EventTrigger>
            <i:EventTrigger EventName="MouseLeave">
                <ei:GoToStateAction StateName="normal"/>
            </i:EventTrigger>            

        </i:Interaction.Triggers>
        <Grid>
            
            <Rectangle Margin="0,0,48,0" Stroke="#FFFFC700" VerticalAlignment="Center" Height="100" RadiusX="15" RadiusY="15" StrokeThickness="2" Fill="Black"/>
            <TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="{Binding Text, FallbackValue=Loading ...}" Margin="12,15,116,42" Foreground="White" FontSize="14.667" FontFamily="Lucida Sans Unicode" TextTrimming="WordEllipsis" MaxHeight="68" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<CompositeTransform ScaleX="-1"/>
            	</TextBlock.RenderTransform>
            </TextBlock>
            <Ellipse Width="120" x:Name="MainEllipse" Height="120" HorizontalAlignment="Right" Stroke="#FFFFC700" StrokeThickness="5" Fill="#FF111111" Cursor="Hand"  >
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <ei:HyperlinkAction TargetWindow="_blank" NavigateUri="{Binding Converter={StaticResource LinkToPostConverter}}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Ellipse>
            <Viewbox HorizontalAlignment="Right" Margin="0" Width="120" Height="120" IsHitTestVisible="False">
                <ZFCNew_Vectors:Zakumi Width="100" Height="100" RenderTransformOrigin="0.5,0.5" Margin="0,0,75,91">
                    <ZFCNew_Vectors:Zakumi.RenderTransform>
                        <CompositeTransform ScaleX="0.25" ScaleY="0.25"/>
                    </ZFCNew_Vectors:Zakumi.RenderTransform>
                </ZFCNew_Vectors:Zakumi>
            </Viewbox>
            <Ellipse Width="120" Height="120" HorizontalAlignment="Right" Stroke="#FFFFC700" StrokeThickness="5" IsHitTestVisible="False">
            	
                <Ellipse.Fill>
                    <ImageBrush ImageSource="{Binding ProfileImageUrl}" />
                </Ellipse.Fill>
            </Ellipse>
        	<StackPanel HorizontalAlignment="Right" Margin="0,0,646,15" Orientation="Horizontal" VerticalAlignment="Bottom" RenderTransformOrigin="0.5,0.5">
        		<StackPanel.RenderTransform>
        			<CompositeTransform ScaleX="-1"/>
        		</StackPanel.RenderTransform>
        		<TextBlock TextWrapping="Wrap" Text="By:" FontFamily="Franklin Gothic Demi" Foreground="#FF565656" d:LayoutOverrides="Width" FontSize="16"/>
        		<HyperlinkButton NavigateUri="{Binding Converter={StaticResource LinkToProfileConverter}}" Content="{Binding From.Name}" Style="{StaticResource LinkWithoutBorderStyle}" FontSize="16" Foreground="#FF565656" TargetName="_blank"/>
        		<HyperlinkButton Content="{Binding FromUser}" NavigateUri="{Binding Converter={StaticResource LinkToProfileConverter}}" Style="{StaticResource LinkWithoutBorderStyle}" FontSize="16" Foreground="#FF565656" TargetName="_blank"/>

        	</StackPanel>

        </Grid>
    </Grid>
</UserControl>